package org.myorg.v3;

import java.util.Arrays;
/*
Formulation:

Minimize:
f(x) = sum((10^6)^((i-1)/(D-1))*x(i)^2)

-100 <= x(i) <= 100

global minimum

f(x) = 0
x(i) = 0, i=1:n
 */
public class FF32 extends Fc3 {

	public FF32() {

		low = Math.PI;
		high = 2*Math.PI;
		best = Double.NEGATIVE_INFINITY;
	}

	public double fc(double[] tmp) {
		double y = 0;
		
		double n = tmp.length;
						
		for (int i = 1; i < n; i++ ) {
			y = y + tmp[i]*tmp[i] - 10 *Math.cos(2*Math.PI*tmp[i]) + 10;
		}
		
		
		
		return y;
	}

}